package org.jeecg.modules.lottery.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Table(name = "proc_lottery_management")
@TableName("proc_lottery_management")
@ApiModel(value = "Lottery对象", description = "抽签管理")
public class LotteryManagement implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "采购方案ID")
    @NotBlank(message = "采购方案ID不能为空")
    @Column(name = "purchase_id")
    private String purchaseId;

    @ApiModelProperty(value = "项目名称")
    @NotBlank(message = "项目名称不能为空")
    @Column(name = "1")
    private String projectName;

    /**项目编号*/
    @ApiModelProperty(value = "项目编号")
    private String projectNumber;


    @ApiModelProperty(value = "预算金额")
    private BigDecimal budgetAmount;

    @ApiModelProperty(value = "抽签时间")
    @Column(name = "draw_time")
    private Date drawTime;

    @ApiModelProperty(value = "抽签类别")
    @Column(name = "category")
    private String category;

    @ApiModelProperty(value = "参与供应商数量")
    @Column(name = "participant_count")
    private int participantCount;

    @ApiModelProperty(value = "抽签状态：0-未抽签，1-已抽")
    @Column(name = "status")
    private String status;

    @ApiModelProperty(value = "抽签人员")
    @Column(name = "draw_person")
    private String drawPerson;

    @ApiModelProperty(value = "抽签完成时间")
    @Column(name = "draw_end_time")
    private Date drawEndTime;


    @ApiModelProperty(value = "抽取数量")
    @Column(name = "draw_quantity")
    private int drawQuantity;

    @ApiModelProperty(value = "抽签规则")
    @Column(name = "draw_rule")
    private String drawRule;

    @ApiModelProperty(value = "中签供应商")
    @Column(name = "winning_suppliers")
    private String winningSuppliers;

//    @ApiModelProperty(value = "参与供应商列表")
//    @Column(name = "participants")
//    private List<Lottery> participants;//

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "完成时间")
    @Column(name = "complete_time")
    private Date completeTime;

}
